1. Field of the Invention
The present invention relates to a circuit and a method for pipe arbitration. In particular, the present invention relates to a circuit and a method for pipe arbitration for an embedded device.
2. Description of Related Art
USB (Universal Serial Bus) is one of serial bus standards for connecting various peripheral devices to a host device. EHCI (Enhanced Host Controller Interface) and OHCI (Open Host Controller Interface), which are common host controller standards of USB, are assumed to input and output data via a bus. FIG. 4 is a block diagram illustrating the concept of USB data transfer using the EHCI standard.
In the USB data transfer using the EHCI standard, control software creates a USB transaction list complied with the format defined by the EHCI standard for an endpoint in which a transfer request is generated. The control software writes the created USB transaction list to a system memory 21. Specifically, the control software creates the USB transaction list, and performs memory management of allocation and release to and from the system memory 21. A DMA (Direct Memory Access) master 23 reads the USB transaction list from the system memory 21 via a PCI bus. Then, a sequencer 22 performs the USB data transfer according to a transfer order defined by the USB transaction list which is read by the DMA master 23. The sequencer 22 is a processing unit that performs transfer control of data.
However, embedded devices, such as a digital still camera and printer, are not often mounted with high performance CPUs (Central Processing Unit) and PCI buses unlike PCs (Personal Computer). Therefore, embedded devices not mounted with the PCI buses cannot use a USB host controller complied with the standard. Further, the USB data transfer using the EHCI standard requires processes by software such as creation of the abovementioned USB transaction list, and thereby causing high load of processes.
Published Japanese Translation of PCT International Publication for Patent Application No. 2007-502476 discloses a technique relating to a USB host controller used for the embedded device. This USB host controller enables a device without a PCI bus to perform the USB data transfer complied with the USB host controller standard. However, even this USB host controller cannot reduce the load of the control software to create the USB transaction list.
In order to reduce the complication of the process by the control software, there are products (for example, USB 2.0 controller R8A66597 produced by Renesas Electronics) mounted with a USB host controller that does not require the creation of the USB transaction list and enables USB transfers only by an I/O access process (such USB host controller is hereinafter referred to as a USB host controller for embedded devices).
FIG. 5 illustrates a configuration of the USB host controller for embedded devices. A USB host controller 40 includes a CPU interface control block 41, a USB transfer schedule control block 42, a USB pipe control circuit 43, a buffer memory for USB pipes 44, a USB interface control block 45, and a USB downstream port 46. The CPU interface control block 41 is an interface with a CPU that performs processes of software for controlling the USB host controller 40. The USB transfer schedule control block 42 determines a data transfer order of endpoints in an effective state according to conditions defined by the USB host controller standard. The USB pipe control circuit 43 controls virtual communication paths called pipes so as to issue USB data transfer, and perform buffering control of transfer data and control USB protocol. The buffer memory for USB pipes 44 is used for temporal data input and output at the time of data transfer by an external device connected to USB, a microcomputer including the USB host controller 40 or the like. The USB interface control block 45 is an interface that mediates processes generated between the USB pipe control circuit 43 and the USB downstream port 46. The USB downstream port 46 is a port for the USB host controller 40 to connect to the external device.
FIG. 6 is a block diagram illustrating an extraction of the part concerning USB control in the USB system mounted with the USB host controller 40 illustrated in FIG. 5. FIG. 6 illustrates the state in which a multi-card reader/writer 55 and a USB external hard disk 56 are physically connected to a USB host mounted system 50.
However, there are following problems in the USB data transfer process by the USB host controller for embedded devices. The USB data transfer process by the USB host controller for embedded devices is explained with reference to FIGS. 5 and 6.
The USB host controller 40 in FIG. 6 supports six pipe control circuits 431 to 436. In other words, the USB host controller 40 includes six pipe control circuits 431 to 436. In this example, the USB transfer schedule control block 42 selects an endpoint of the multi-card reader/writer 55 as a USB data transfer target endpoint. The multi-card reader/writer 55 shall transfer data using six pipes. When the multi-card reader/writer 55 is connected to the USB host controller 40, the multi-card reader/writer 55 occupies and uses the pipe control circuits 431 to 436. In this case, even if another USB external hard disk 56 is physically connected to the USB host mounted system 50, there is no available pipe control circuit in the USB host controller 40. Therefore, the USB external hard disk 56 cannot be in connection with the USB host controller 51 via the pipe.
Generally a USB host controller for embedded devices supports about ten pipe control circuits. A common USB memory and a USB hard disk transfer data using three pipe control circuits. Further, a sophisticated multifunction printer transfers data using about twelve pipe control circuits. Accordingly, in the USB host controller for embedded devices, only about three USB memories or USB hard disks in total can be in connection via pipes. Moreover, in the abovementioned USB host controller for embedded devices, there is a possibility that the sophisticated multifunction printer may not be in connection via the pipe.